In an FITH (Fiber To The Home) system, quality of an access fiber link is very important to user experience. A user usually obtains a magnitude of a receive optical power of an ONU by using an RSSI (Received Signal Strength Indication) of the ONU, and further determines quality of an access fiber link.
At present, a circuit for detecting a magnitude of a receive optical power in an ONU, as shown in FIG. 1, includes an analog-to-digital converter and a sampling circuit. The sampling circuit includes a filter capacitor C and a sampling resistor R that are connected in parallel. One end of the sampling resistor R is connected to an input end of the analog-to-digital converter and is configured to be connected to an output end of a BOSA (Bi-Directional Optical Sub-Assembly), and the other end of the sampling resistor R is connected to a grounding end of the analog-to-digital converter and is configured to be grounded. One end of the filter capacitor C is configured to be connected to the output end of BOSA, and the other end of the filter capacitor C is configured to be grounded. A principle of the circuit shown in FIG. 1 is as follows: The BOSA converts a received optical signal into a photocurrent and inputs the photocurrent to the sampling circuit to form an analog voltage. The analog-to-digital converter performs analog-to-digital conversion on the analog voltage and outputs a digital voltage. In an actual application, the ONU performs sampling on five optical signals with different optical powers by using the circuit shown in FIG. 1, to obtain five different digital voltages. Then, the ONU performs curve fitting on the optical powers and the digital voltages corresponding to the optical powers, to obtain a correspondence curve between the digital voltages and the optical powers. In this way, the ONU can calculate a magnitude of an optical power of a received optical signal according to a digital voltage outputted by the analog-to-digital converter and the correspondence curve.
However, when an optical power of an optical signal received by the BOSA is excessively large, a photocurrent inputted to the sampling circuit is also excessively large. Consequently, an analog voltage across the two ends of the sampling resistor exceeds a sampling voltage range of the analog-to-digital converter, causing damage to the analog-to-digital converter.